﻿namespace Chain.IDAL
{
    using Chain.DBUtility;
    using Chain.Model;
    using System;
    using System.Data;
    using System.Data.SqlClient;
    using System.Runtime.InteropServices;
    using System.Text;
    public class Mem_share_log
    {
        public DataSet GetList(string strWhere)
        {
            StringBuilder builder = new StringBuilder();
            builder.Append("select ID,memid,datetime ,ShareSetId ");
            builder.Append("from Mem_share_log");
            if (strWhere.Trim() != "")
            {
                builder.Append(" where " + strWhere);
            }
            return DbHelperSQL.Query(builder.ToString());
        }
        public void addMemShareLog(int memid, int shareSetId) {
            StringBuilder builder = new StringBuilder();
            builder.Append("insert into  Mem_share_log(");
            builder.Append("memid, sharesetid)");
            builder.Append("values(");
            builder.Append(memid.ToString()+","+shareSetId.ToString()+")");
            DbHelperSQL.Query(builder.ToString());
        }

    }
}
